package com.lindroy.jetpacknotes.logic.model

import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
import androidx.paging.PagingData
import androidx.paging.cachedIn
import com.lindroy.jetpacknotes.logic.network.Repository
import kotlinx.coroutines.flow.Flow

/**
 * @author Lin
 * @date 2022/1/14
 * @function
 */
class MainViewModel : ViewModel() {

    val pagingData: Flow<PagingData<ArticleResp>>
        get() = Repository.pagingData.cachedIn(viewModelScope)
}